package models

import (
	"github.com/goravel/framework/database/orm"
)

type Configuration struct {
	orm.Model
	ServerName string `gorm:"column:server_name;type:varchar(255);not null;default:''" form:"server_name" json:"server_name"`
	ServerPort string `gorm:"column:server_port;type:int(11);not null;default:0" form:"server_port" json:"server_port" comment:"服务器端口"`
	Host       string `gorm:"column:host;type:varchar(255);not null;default:''" form:"host" json:"host"`
	Port       string `gorm:"column:port;type:varchar(255);not null;default:''" form:"port" json:"port"`
	Username   string `gorm:"column:username;type:varchar(255);not null;default:''" form:"username" json:"username"`
	Password   string `gorm:"column:password;type:varchar(255);not null;default:''" form:"password" json:"password"`
	Type       string `gorm:"column:type;type:varchar(255);not null;default:''" form:"type" json:"type"`
	//user_id为外键
	UserID uint `gorm:"foreignkey:user_id;association_foreignkey:id" form:"user_id" json:"user_id"`
	Active int  `gorm:"column:active;type:int(11);not null;default:0" form:"active" json:"active" comment:"是否激活"`
}
